初始化完成后:
点击左侧目录后:
具体实现:
初始化时:
//Main - Maincontent vboxMainRightcontent = new VBox(); empListContainer = new MainContent(); empListContainer.visible = false; vboxMainRightcontent.addChild(empListContainer); //----------------------------加入button 测试 invilidate...---------- testButton.label = "我是来测试的"; vboxMainRightcontent.addChild(testButton); empListContainer.explicitHeight = 0;//注意此处, 设置为0方可不占用界面中的场地, 注意在visable设置为true之后还要进行相应的调整 empListContainer.explicitWidth = 0;
左侧目录被点击后:
//---------------------------------Listeners------------------------ //Listener - onListChange private function onDepListChange(e:ListEvent):void { _empListContainer.visible = _treeDepCat.selectedItem != null; if(_empListContainer.visible) { _empListContainer.explicitHeight = undefined;//将explicitHeight复原, 否则虽然已经visable, 但其宽高都是0 仍无法可见. _empListContainer.explicitWidth = undefined; }else { _empListContainer.explicitHeight = 0; _empListContainer.explicitWidth = 0; }
Flex: 对象编辑器的实现思路 <->
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.